package com.lovo.controller;


import com.lovo.bean.OrderBean;
import com.lovo.dao.IOrderDAO;
import com.lovo.result.GlobalHandleException;
import com.lovo.result.ResponseResult;
import com.lovo.service.IOrderService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author bdk
 * @since 2021-03-10
 */
@RestController
@RequestMapping("/orders")
@ResponseResult
public class OrderController {
    @Resource
    private IOrderService orderService;
    @PostMapping
    public Object add(Long userId,Long commId) throws GlobalHandleException {
        orderService.buy(userId,commId);
        return null;
    }

}

